<!DOCTYPE html>
<html lang="zh-CN" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <link rel="stylesheet" th:href="@{/layui/dist/css/layui.css}">
    <link rel="stylesheet" th:href="@{/layui/dist/css/admin.css}">
    <title>管理员操作</title>
</head>
<body class="layui-layout-body">
    <div class="layui-layout layui-layout-admin">
        <div class="layui-header custom-header">
            
            <ul class="layui-nav layui-layout-left">
                <li class="layui-nav-item slide-sidebar" lay-unselect>
                    <a href="javascript:;" class="icon-font"><i class="ai ai-menufold"></i></a>
                </li>
            </ul>

            <ul class="layui-nav layui-layout-right">
                <li class="layui-nav-item">
                    <a href="javascript:;" ><span  th:text="${session.admin.name}"></span></a>
                    <dl class="layui-nav-child">
						<dd><a href="javascript:;" onclick="modifyPwd()">修改密码</a></dd>
                        <dd><a href=""th:href="@{/loginout}" >退出</a></dd>
                    </dl>
                </li>
            </ul>
        </div>

        <div class="layui-side custom-admin">
            <div class="layui-side-scroll">

                <div class="custom-logo">
                    <h1 style="margin: 0 20px 0 80px">管理员操作</h1>
                </div>
                <ul id="Nav" class="layui-nav layui-nav-tree">
                    <li class="layui-nav-item">
                        <a href="javascript:;">
                            <i class="layui-icon">&#xe857;</i>
                            <em>图书管理</em>
                        </a>
                        <dl class="layui-nav-child">
                            <dd><a th:href="@{/bookList}">图书列表</a></dd>
                        </dl>
                    </li>

                    <li class="layui-nav-item">
                        <a href="javascript:;">
                            <i class="layui-icon">&#xe612;</i>
                            <em>用户管理</em>
                        </a>
                        <dl class="layui-nav-child">
                            <dd><a th:href="@{/userList}">用户列表</a></dd>
                        </dl>
                        <dl class="layui-nav-child">
                            <dd><a th:href="@{/adminList}">管理员列表</a></dd>
                        </dl>
                    </li>
                </ul>
            </div>
        </div>

        <div class="layui-body">
             <div class="layui-tab app-container" lay-allowClose="true" lay-filter="tabs">
                <ul id="appTabs" class="layui-tab-title custom-tab"></ul>
                <div id="appTabPage" class="layui-tab-content"></div>
            </div>
        </div>

        <div class="layui-footer">
            <p>© 2018 <a href="http://www.code.com/" target="_blank">图书管理系统</a></p>
        </div>

        <div class="mobile-mask"></div>
    </div>
    <script th:src="@{layui/dist/layui.js}"></script>
    <script th:src="@{layui/dist/index.js}" data-main="home"></script>
    <script th:src="@{/layui/dist/layui.all.js}" charset="utf-8"></script>
    <script type="text/javascript" th:src="@{/js/jquery.min.js}"></script>
    <script th:inline="javascript">
        /*<![CDATA[*/
        var contextPath = [[${#request.getContextPath()}]]; //获取当前应用路径
        var id = [[${session.admin.id}]];
        /*]]>*/
    </script>
    <script type="text/javascript">
        function a() {
            $("#Nav li").eq(1).find("dl").eq(0).find("dd a:eq(0)").click();
        }
        $(document).ready(function () {
            window.onload =a;
        })

    function modifyPwd() {
        //页面层
        layer.open({
            type: 2,
            title: '用户修改密码',
            skin: 'layui-layer-rim', //加上边框
            area: ['750px', '400px'], //宽高
            content: contextPath + '/modifyAdminPwd'
        });

    }

    </script>
</body>
</html>